﻿Public Class NewYearsEve
    Private loader As FuncClasses.IDatabase
    Public Sub New(window As Window1)

        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()
        loader = window.Database
        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
        Dim showit As Boolean
        Try
            showit = CBool(loader.GetSettingByKey("shownewyearseve"))
        Catch ex As Exception
            showit = True
        End Try
        If FuncClasses.Statistics.CompanyStats.IsDateBetween(New Date(Date.Today.Year, 12, 26), New Date(Date.Today.Year + 1, 1, 1), Date.Today) AndAlso showit Then
            window.AddNewWelcomeInfo(Me)
        Else
            '#If DEBUG Then
            '            window.AddNewWelcomeInfo(Me)
            '#End If
        End If
    End Sub

    Private Sub CheckBox1_Checked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Checked
        loader.SetSettingByKey("shownewyearseve", "False")
    End Sub

    Private Sub CheckBox1_Unchecked(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles CheckBox1.Unchecked
        loader.SetSettingByKey("shownewyearseve", "True")
    End Sub
End Class
